import { IsEmail, Length } from "class-validator";
import BaseEntity from "./BaseEntity";
import { ExtData } from './CustomTransform'
import { Transform, Type } from 'class-transformer'


export class EmailCodeEntity extends BaseEntity {

  @IsEmail()
  email: string

  @Type(() => String)
  @Length(6, 6)
  code: string

  @Type(() => Number)
  status: string

  @Transform(ExtData)
  ext_data: string

}

